<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC>
<html>
<head>
<base href="<%=basePath%>">

<title>编辑商品</title>
<script src="js/jquery.min.js"></script>
<link rel="stylesheet" href="css/bootstrap.css">
<script src="js/bootstrap.js"></script>
<link rel="stylesheet" href="css/release.css">
<link rel="stylesheet" href="css/main.css">
<script src="js/release.js"></script>
<script type="text/javascript">
	$(function() {
		$("#cancel").click(function() {
			window.location = "inquiry/all.do";
		});

		$("#loginOut").click(function() {
			if (userId == "null") {
				window.location = "admin/userLogin.jsp";
			}
			;
			if (userId != "null") {
				window.location = "login/loginOut.do";
			}
			;
		});
	});
</script>

</head>

<body>
	<header> </header>
	<div class="person-info container">
		<span>欢迎: ${userName}</span> &nbsp&nbsp&nbsp<a
			href="javaScript:void(0)" id="loginOut">${userName!=null ? '退出' : '登录'}</a>
		<input type="hidden" value="${userName}" id="userName">
		<div class="person-info-show"></div>
	</div>
	<nav class=" navbar-default nav-extends" role="navigation">
		<div class="container" style="margin-top:25px;">
			<div class="container-fluid">
				<!-- Brand and toggle get grouped for better mobile display -->
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed"
						data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
						<span class="sr-only">Toggle navigation</span> <span
							class="icon-bar"></span> <span class="icon-bar"></span> <span
							class="icon-bar"></span>
					</button>
					<a class="brand" href="inquiry/all.do">科大二手交易平台</a>
				</div>

				<!-- Collect the nav links, forms, and other content for toggling -->
				<div class="collapse navbar-collapse "
					id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li class=""><a href="inquiry/all.do">首页</a></li>
						<li style="border-left:1px solid #CCCCCC;"><a
							href="http://s.ershou.taobao.com/">Link</a></li>
						<li style="border-left:1px solid #CCCCCC;"><a
							href="javaScript:void(0)" id="publishCommodity">发布闲置</a></li>
						<li style="border-left:1px solid #CCCCCC;"><a
							href="userInfo/searchProduct.do" id="publishCommodity">我的二手</a></li>
					</ul>
					<form class="navbar-form navbar-right" role="search"
						action="inquiry/search.do" method="post">
						<div class="form-group">
							<input type="text" class="form-control" placeholder="输入商品名，或@用户名"
								name="searchInput" value="${searchInput}">
						</div>
						<button type="submit" class="btn btn-default ">
							查询 <span class="glyphicon glyphicon-search"></span>
						</button>
					</form>
				</div>
				<!-- /.navbar-collapse -->
			</div>
			<!-- /.container-fluid -->
		</div>
	</nav>

	<!--header end-->
	<section class="input-container">
		<header></header>
		<!--input info-->
		<section>
			<form action="edit/addCommodity.do" method="post"
				enctype="multipart/form-data">
				<input type="hidden" name="userId" value="${userId}">
				<!--input title-->
				<div class="form-group">
					<label for="sellTitle">标题:</label> <input class="form-control"
						type="text" name="productName" id="sellTitle"
						placeholder="请输入标题..">
				</div>
				<!--input img-->
				<div class="inputFileImg" id="imgList">
					<!--inputFile-->
					<div class="testimg" id="">
						<a href="#" class="fileStyle"> <input type="file" value=""
							name="files" id="inputPicUpload" class="" multiple>
						</a> <span>添加图片</span>
					</div>
				</div>
				<!--description info-->
				<div class="clearFloat">
					<span>&#40;请在50-350个字范围内描述商品&#41;</span> <span class="fr">还剩余<b><i
							id="commodityDescriptionSurplus">300</i></b>个字
					</span>
					<textarea class="form-control" name="productDescription"
						id="commodityDescription" cols="30" rows="8" maxlength="350"
						placeholder="描述一下你的商品吧.."></textarea>
				</div>
				<!--choose input class-->
				<div class="radio">
					<span style="font-weight:bold;margin-right:10px;">出售方式:</span> <label
						for="optionRadio-1" class="radio-inline"> <input
						type="radio" value="一口价" name="sellWay" id="optionRadio-1">
						一口价
					</label> <label for="optionRadio-2" class="radio-inline"> <input
						type="radio" value="拍卖" name="sellWay" id="optionRadio-2">
						拍卖
					</label> <label for="optionRadio-3" class="radio-inline"> <input
						type="radio" value="不开价" name="sellWay" id="optionRadio-3"
						checked="checked"> 不开价
					</label>
				</div>
				<div class="form-group">
					<label for="sellPrice">新旧程度描述:</label> <span style="color:#cccccc;">&#40;&yen;&#41;</span>
					<input type="text" name="productCondition" id="productCondition"
						class="form-control" placeholder="请输入商品新旧程度..例：全新，99新">
				</div>
				<!--price-->
				<div class="form-group">
					<label for="sellPrice">价格:</label> <span style="color:#cccccc;">&#40;&yen;&#41;</span>
					<input type="text" name="currentPrice" id="sellPrice"
						class="form-control" placeholder="请输入商品出售价格..">
				</div>
				<div class="form-group">
					<label for="">原价:</label> <span style="color:#cccccc;">&#40;&yen;&#41;</span>
					<input type="text" class="form-control" placeholder="可选择填写商品原价格.."
						name="originalPrice">
				</div>
				<!--select-->
				<div class="form-group">
					<label for="">分类:</label> <span style="color:#cccccc;">&#40;请选择商品所属类型&#41;</span>

					<ul class="commodityClassify">
						<li class="classOne"><a href="javaScript:void(0)">数码电器|电脑配件</a>
							<ul class="classTwo checkbox">
								<li><input type="radio" value="11101" name="typeId">
									&nbsp&nbsp电脑</li>
								<li><input type="radio" value="11102" name="typeId">
									&nbsp&nbsp相机</li>
								<li><input type="radio" value="11103" name="typeId">
									&nbsp&nbsp配件</li>
							</ul></li>
						<li class="classOne"><a href="javaScript:void(0)">日用品|服饰</a>
							<ul class="classTwo checkbox">
								<li><input type="radio" value="22201" name="typeId">
									上衣</li>
								<li><input type="radio" value="22202" name="typeId">
									&nbsp&nbsp&nbsp裤</li>
								<li><input type="radio" value="22203" name="typeId">
									&nbsp&nbsp&nbsp鞋</li>
							</ul></li>
						<li class="classOne"><a href="javaScript:void(0)">书刊音像|文体</a>
							<ul class="classTwo checkbox">
								<li><input type="radio" value="33301" name="typeId">
									&nbspdvd光碟</li>
								<li><input type="radio" value="33302" name="typeId">
									&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp球类</li>
								<li><input type="radio" value="33303" name="typeId">
									考研书籍</li>
							</ul></li>
						<li class="classOne"><a href="javaScript:void(0)">其他</a>
							<ul class="classTwo checkbox">
								<li><input type="radio" value="44401" name="typeId">
									&nbsp其他</li>
							</ul></li>
					</ul>

					<!--<select name="commodityClassify" id="commodityClassify" class="form-control">
                        <option value=""></option>
                        <option value="">书籍</option>
                        <option value="">日用品</option>
                        <option value="">手机支架</option>
                        <option value="">椅子</option>
                        <option value="">健身器材</option>
                    </select>-->
				</div>

				<footer style="overflow:hidden">
					<button type="button" id="cancel" class="btn btn-default fr">&nbsp&nbsp&nbsp&nbsp取消&nbsp&nbsp&nbsp&nbsp</button>
					<button type="submit" id="inputSell" class="btn btn-primary fr">商品上架</button>
				</footer>
			</form>
		</section>
	</section>
	<!--section end-->
	<footer> </footer>
</body>
</html>
